#ifndef __UAVCAN_PARAM_H__
#define __UAVCAN_PARAM_H__ 


/*
 * Application constants
 */
#define APP_VERSION_MAJOR                                           1
#define APP_VERSION_MINOR                                           0
#define APP_NODE_NAME                                               "org.uavcan.libcanard.gprs"

//275.Version
#define UAVCAN_NODE_VERSION_MESSAGE_SIZE                             5
#define UAVCAN_NODE_VERSION_DATA_TYPE_ID                             275

//310.Pwm.uavcan
#define UAVCAN_NODE_PWM_MESSAGE_SIZE                                  2
#define UAVCAN_NODE_PWM_DATA_TYPE_ID                                  310

//320.Agro.pump
#define UAVCAN_NODE_PUMP_MESSAGE_SIZE								8
#define UAVCAN_NODE_PUMP_DATA_TYPE_ID								320

//320.Agro.Agro
#define UAVCAN_NODE_AGRO_MESSAGE_SIZE								5
#define UAVCAN_NODE_AGRO_DATA_TYPE_ID								400

//341.NodeStatus
#define UAVCAN_NODE_NodeStatus_MESSAGE_SIZE								7
#define UAVCAN_NODE_NodeStatus_DATA_TYPE_ID								341

//303.Gps
#define UAVCAN_NODE_GPS_MESSAGE_SIZE								53
#define UAVCAN_NODE_GPS_DATA_TYPE_ID								303

//15.Mag
#define UAVCAN_NODE_MAG_MESSAGE_SIZE								7
#define UAVCAN_NODE_MAG_DATA_TYPE_ID								15

//1012.PWM
#define UAVCAN_NODE_PWM_SELF_MESSAGE_SIZE                11
#define UAVCAN_NODE_PWM_SELF_DATA_TYPE_ID                1012


//1060.Fix
#define UAVCAN_NODE_FIX_MESSAGE_SIZE								78  // (	(328 + 288 + 8)/8)=77 + 2 CRC ��+8 ��֪��Ϊʲô��һ��
#define UAVCAN_NODE_FIX_DATA_TYPE_ID								1060

//1013.PWM_RETRUN
#define UAVCAN_NODE_PWM_RETRUN_MESSAGE_SIZE                1
#define UAVCAN_NODE_PWM_RETRUN_DATA_TYPE_ID                1013

//720.BattData12S
#define UAVCAN_NODE_BATTDATA12S_MESSAGE_SIZE								34
#define UAVCAN_NODE_BATTDATA12S_DATA_TYPE_ID								720

//721.BattData14S
#define UAVCAN_NODE_BATTDATA14S_MESSAGE_SIZE								38
#define UAVCAN_NODE_BATTDATA14S_DATA_TYPE_ID								721

//725.Batt Para
#define UAVCAN_NODE_BATTPARA_MESSAGE_SIZE								32
#define UAVCAN_NODE_BATTPARA_DATA_TYPE_ID								725


//550.NodeStatus.uavcan
#define UAVCAN_NODE_NODE_STATUS_DATA_TYPE_ID                         550

//1126. EMS
#define UAVCAN_NODE_NODE_EMS_DATA_TYPE_ID                         1126
#define UAVCAN_NODE_EMS_MESSAGE_SIZE                              7

//1027.AIRSPEED
#define UAVCAN_NODE_AIR_SPEED_MESSAGE_SIZE                17
#define UAVCAN_NODE_AIR_SPEED_DATA_TYPE_ID                1027

//����������
#define UAVCAN_NODE_NODE_OIL_DATA_TYPE_ID   1127
#define UAVCAN_NODE_OIL_MESSAGE_SIZE     7 

//1092.BatteryInfo
#define UAVCAN_NODE_BATTERYINFO_DATA_TYPE_ID  1092
#define UAVCAN_NODE_BATTERYINFO_SIZE          23    

//1095.S_BatteryInfo
#define UAVCAN_NODE_S_BATTERYINFO_DATA_TYPE_ID  1095
#define UAVCAN_NODE_S_BATTERYINFO_SIZE          7  

#define UAVCAN_NODE_IMU_S_DATA_TYPE_ID  1040
#define UAVCAN_NODE_IMU_S_SIZE          14

//1130 ��ϸ߶�
#define UAVCAN_NODE_FIX_ALTITUDE_DATA_TYPE_ID 1130
#define UAVCAN_NODE_FIX_ALTITUDE_SIZE         8  

//1147 �Զ�����ɡ�豸
#define UAVCAN_NODE_PARACHUTE_DATA_TYPE_ID 1147
#define UAVCAN_NODE_PARACHUTE_DATA_SIZE    7

#define UAVCAN_NODE_RAW_IMU_TYPE_ID  1003
#define UAVCAN_NODE_SOLUTION_TYPE_ID 1000



enum TransferType
{
   TransferTypeServiceResponse  = 0,
   TransferTypeServiceRequest   = 1,
   TransferTypeMessageBroadcast = 2,
   TransferTypeMessageUnicast   = 3,
   NumTransferTypes = 4
};

/**********************************************************
  * @brief  data_type_id
***********************************************************/
#define UAVCAN_NODE_STATUS_DATA_TYPE_SIGNATURE 5


#define NODE_STATUS_TRUE  0xCE5F864F3D2EF950ULL
#define GPS_FIX1          0x54c1572b9e07f297ULL
#define CON_PWM           0xB45B8C5AF0C16325ULL
#define AIR_POLIT         0xC77DF38BA122F5DAULL
#define MAG_TURE          0xB6AC0C442430297EULL
#define RAW_IMU           0x8280632c40e574b5ULL
#define SOLUTION          0x72a63a3c6f41fa9bULL
#define ENGINE            0x565E70189113B9C7ULL
#define BATTERYINFO_CRC   0x249c26548a711966ULL

#define IMU_S             0xB6173FAA5FD293D0ULL

#define FIX_ALT           0x0000000000000000ULL

#define PARACHUTE_TRUE    0x8C6A67FD1BD65340ULL

#endif	// 
